<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<% 
String path = request.getContextPath(); //跳转后样式丢失问题
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>店铺分类管理</title>
<link rel="stylesheet" type="text/css"
	href="<%=path%>/background/style/resource/Css/bootstrap.css" />
<link rel="stylesheet"
	href="<%=path%>/background/style/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css"
	href="<%=path%>/background/style/css/sweetalert.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/background/style/resource/Css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/background/style/resource/Css/style.css" />
<script type="text/javascript"
	src="<%=path%>/background/style/resource/Js/jquery.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/resource/Js/jquery.sorted.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/resource/Js/bootstrap.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/resource/Js/ckform.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/resource/Js/common.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/js/sweetalert.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/js/sweetalert-dev.js"></script>
<script type="text/javascript"
	src="<%=path%>/background/style/js/sort.js"></script>
<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}

		.table  th{
			text-align:center;
		}
		.table td{
			text-align:center;
		}
		.table a{
			cursor: pointer;
		}
</style>
</head>
<body>
	<table class="table table-bordered table-hover definewidth m10">
		<thead>
			<tr>
				<th>序号</th>
				<th>类名</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody id="tbody">
		</tbody>
	</table>
<button type="button" style="margin-left: 20px; margin-top: 10px;" class="btn btn-primary btn-lg" data-toggle="modal"
		data-target="#myModal">新增分类</button>

	<!-- 添加分类框（Modal） -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">添加分类</h4>
				</div>
					<div class="modal-body">
						<input type="text" class="span6" name="name" id="addName" placeholder="输入类别名">

					</div>
					<div class="modal-footer">
					<!-- 	<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> -->
						<input type="button"  onclick="addSort()" class="btn btn-primary" value="提交">
					</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>

	<!-- 修改分类框（Modal） -->
	<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">修改分类</h4>
				</div>
				<div class="modal-body">
					<input type="hidden" name="id" id="cid"> 
					<input type="text" class="span6" name="name" id="cname">
				</div>
				<div class="modal-footer">
					<!-- <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> -->
					<input type="button" class="btn btn-primary" onclick="updateSort()" value="修改">
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
</body>
</html>